<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>构造函数创建自定义对象</title>
	</head>
	<body>
		<script>
			function Person(name, age) {
				this.name = name;
				this.age = age;
				this.eat = function () {
					console.log("我吃吃吃");
				};
			}
			var person = new Person("zhangsan", 23);
			console.log(person.name);
			console.log(person.age);
			person.eat;
		</script>
	</body>
</html>
